<?php
/***************************************************************
*  Copyright notice
*
*  (c) 2012 Michal Lulco <michal.lulco@gmail.com>
*  All rights reserved
*
*  This script is part of the TYPO3 project. The TYPO3 project is
*  free software; you can redistribute it and/or modify
*  it under the terms of the GNU General Public License as published by
*  the Free Software Foundation; either version 2 of the License, or
*  (at your option) any later version.
*
*  The GNU General Public License can be found at
*  http://www.gnu.org/copyleft/gpl.html.
*
*  This script is distributed in the hope that it will be useful,
*  but WITHOUT ANY WARRANTY; without even the implied warranty of
*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
*  GNU General Public License for more details.
*
*  This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
 * [CLASS/FUNCTION INDEX of SCRIPT]
 *
 * Hint: use extdeveval to insert/update function index above.
 */

require_once(PATH_tslib.'class.tslib_pibase.php');


/**
 * Plugin 'Usmev s ciarkou Footer' for the 'main' extension.
 *
 * @author	Michal Lulco <michal.lulco@gmail.com>
 * @package	Main
 * @subpackage	tx_main
 */
class tx_main_header extends tslib_pibase {
	var $prefixId      = 'tx_main_header';		// Same as class name
	var $scriptRelPath = 'header/class.tx_main_header.php';	// Path to this script relative to the extension dir.
	var $extKey        = 'main';	// The extension key.
	var $pi_checkCHash = true;
	
	/**
	 * The main method of the PlugIn
	 *
	 * @param	string		$content: The PlugIn content
	 * @param	array		$conf: The PlugIn configuration
	 * @return	The content that is displayed on the website
	 */
	function main($content, $conf)	{
		$GLOBALS['TSFE']->additionalHeaderData['viewport'] = '<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">';
		
		$GLOBALS['TSFE']->additionalHeaderData['css'] = '
			<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800" rel="stylesheet" type="text/css">
			<link href="http://fonts.googleapis.com/css?family=Raleway:100,200,300,700,800,900" rel="stylesheet" type="text/css">
			<link rel="stylesheet" href="fileadmin/new_templates/css/bootstrap.css">
			<link rel="stylesheet" href="fileadmin/new_templates/css/bootstrap-theme.css">
			<link rel="stylesheet" href="fileadmin/new_templates/css/fonts/font-awesome/css/font-awesome.css">
			<link rel="stylesheet" href="fileadmin/new_templates/css/animations.css" media="screen">
			<link rel="stylesheet" href="fileadmin/new_templates/css/superfish.css" media="screen">
			<link rel="stylesheet" href="fileadmin/new_templates/css/revolution-slider/css/settings.css" media="screen">
			<link rel="stylesheet" href="fileadmin/new_templates/css/revolution-slider/css/extralayers.css" media="screen">
			<link rel="stylesheet" href="fileadmin/new_templates/css/prettyPhoto.css" media="screen">
			<link rel="stylesheet" href="fileadmin/new_templates/css/style.css">
			<link rel="stylesheet" href="fileadmin/new_templates/css/colors/green.css" class="colors">
			<link rel="stylesheet" href="fileadmin/new_templates/css/theme-responsive.css">
			<link rel="stylesheet" href="fileadmin/new_templates/css/usmev.css">
		';
		
		$GLOBALS['TSFE']->additionalHeaderData['special'] = '
			<!--[if lt IE 9]>
			<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
			<script src="fileadmin/new_templates/js/respond.min.js"></script>
			<![endif]-->
			<!--[if IE]>
			<link rel="stylesheet" href="fileadmin/new_templates/css/ie.css">
			<![endif]-->
		';
		
		$GLOBALS['TSFE']->additionalHeaderData['scripts'] = '
			<script src="fileadmin/new_templates/js/jquery.min.js"></script>
			<script src="fileadmin/new_templates/js/jquery-migrate-1.0.0.js"></script>
			<script src="fileadmin/new_templates/js/jquery-ui.js"></script>
			<script src="fileadmin/new_templates/js/bootstrap.js"></script>
			<script src="fileadmin/new_templates/js/revolution-slider/js/jquery.themepunch.plugins.min.js"></script> 
			<script src="fileadmin/new_templates/js/revolution-slider/js/jquery.themepunch.revolution.min.js"></script>
			<script src="fileadmin/new_templates/js/jquery.parallax.js"></script>
			<script src="fileadmin/new_templates/js/jquery.wait.js"></script>
			<script src="fileadmin/new_templates/js/fappear.js"></script> 
			<script src="fileadmin/new_templates/js/modernizr-2.6.2.min.js"></script>
			<script src="fileadmin/new_templates/js/jquery.bxslider.min.js"></script>
			<script src="fileadmin/new_templates/js/jquery.prettyPhoto.js"></script>
			<script src="fileadmin/new_templates/js/superfish.js"></script>
			<script src="fileadmin/new_templates/js/tweetMachine.js"></script>
			<script src="fileadmin/new_templates/js/tytabs.js"></script>
			<script src="fileadmin/new_templates/js/jquery.gmap.min.js"></script>
			<script src="fileadmin/new_templates/js/jquery.sticky.js"></script>
			<script src="fileadmin/new_templates/js/jquery.countTo.js"></script>
			<script src="fileadmin/new_templates/js/jflickrfeed.js"></script>
			<script src="fileadmin/new_templates/js/jquery.knob.js"></script>
			<script src="fileadmin/new_templates/js/imagesloaded.pkgd.min.js"></script>
			<script src="fileadmin/new_templates/js/waypoints.min.js"></script>
			<script src="fileadmin/new_templates/js/wow.js"></script>
			<script src="fileadmin/new_templates/js/jquery.fitvids.js"></script>
			<script src="fileadmin/new_templates/js/custom.js"></script>
			<script src="fileadmin/new_templates/js/usmev.js"></script>
		';
		
		$GLOBALS['TSFE']->additionalHeaderData['google-analytics'] = "<script>
			(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
			(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
			m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
			})(window,document,'script','//www.google-analytics.com/analytics.js','ga');

			ga('create', 'UA-57056160-2', 'auto');
			ga('send', 'pageview');
		</script>";
		
		$GLOBALS['TSFE']->additionalHeaderData['og:image'] = '<meta property="og:image" content="http://usmevsciarkou.sk/fileadmin/new_templates/images/logo.png">';
		
		$box = new HeaderBox();
		return $box->render();
	}
}



if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/main/header/class.tx_main_header.php']) {
	include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/main/header/class.tx_main_header.php']);
}

?>